<template>
    <div class="add-friend-container">
        <TridentNavBar>
            <template #left><i class="iconfont icon-zuojiantou"></i></template>
            <template #default>添加好友</template>
        </TridentNavBar>

        <div class="content-wrap">
            <!-- 搜索区域开始 -->
            <van-search
                placeholder="请输入搜索手机号"
                input-align="center"
                @click="$router.push('/search')"
            />
            <!-- 搜索区域结束 -->

            <div class="panel-box">
                <div class="panel-item" v-for="(item, index) in menus" :key="index">
                    <div class="image">
                        <i :class="`iconfont icon-${item.icon}`"></i>
                    </div>
                    <div class="text">
                        <div class="left">
                            <p>{{ item.title }}</p>
                            <p>{{ item.desc }}</p>
                        </div>
                        <div class="right">
                            <i class="iconfont icon-youjiantou"></i>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</template>

<script lang="ts" setup>
import { reactive } from 'vue'

// 菜单
const menus = reactive([
    {
        title: '雷达加好友',
        desc: '添加身边的好友',
        icon: '-radar'
    },
    {
        title: '面对面建群',
        desc: '与身边的朋友进入同一个群聊',
        icon: 'mianduimianjianqun'
    },
    {
        title: '扫一扫',
        desc: '扫描二维码',
        icon: 'saoyisao'
    },
    {
        title: '手机联系人',
        desc: '添加或者邀请通讯录中的好友',
        icon: 'xinpengyou'
    }
])
</script>

<style scoped lang="scss">
page,
.add-friend-container {
    height: 100vh;
    // 内容区域开始
    .content-wrap {
        padding: 45px 0;
        .panel-box {
            padding: 0 15px;
            background-color: #fff;
            .panel-item {
                display: flex;
                align-items: center;
                &:nth-child(1) .image {
                    background-color: #6567EE;
                }
                &:nth-child(2) .image {
                    background-color: #1783EC;
                }
                &:nth-child(3) .image {
                    background-color: #08BF60;
                }
                &:nth-child(4) .image {
                    background-color: #F69E3D;
                }

                &:last-child .text {
                    border-bottom: none;
                }
                .image {
                    width: 45px;
                    height: 45px;
                    line-height: 45px;
                    border-radius: 5px;
                    text-align: center;
                    .iconfont {
                        font-size: 25px;
                        color: #fff;
                    }
                }
                .text {
                    flex: 1;
                    color: #000;
                    font-size: 18px;
                    border-bottom: 1px solid #EDEDED;
                    margin-left: 15px;
                    padding: 15px 0;

                    display: flex;
                    justify-content: space-between;
                    align-items: center;
                    .left {
                        flex: 1;
                        p {
                            &:last-child {
                                font-size: 14px;
                                padding-top: 6px;
                                color: #EDEDED;
                            }
                        }
                    }
                    .right {
                        width: 20px;
                        .iconfont {
                            color: #EDEDED;
                            font-size: 14px;
                        }
                    }
                }
            }
        }
    }
}
</style>